// MeasurementManager.h
#pragma once
#include <QObject>
#include <QVariantList>
#include <QPointF>

class MeasurementManager : public QObject {
    Q_OBJECT
public:
    using QObject::QObject;

    Q_INVOKABLE QVariantList smoothCurveOne(const QVariantList &points);
    Q_INVOKABLE QVariantList smoothCurve(
        const QVariantList &points,
        const QPointF &center = QPointF(400, 400)
    );

    Q_INVOKABLE double area(const QVariantList &points);

    Q_INVOKABLE double polygonArea(const QVariantList &curvePoints);

private:
    double polygonArea(const QVector<QPointF> &pts);
};
